/*
 * @Description: 获取路径中的文件名
 * @Author: 小雨
 * @Date: 2024-06-25 15:30:04
 * @LastEditTime: 2024-06-25 15:33:58
 * @LastEditors: 小雨
 */
const path = require('path');

let filename = '/a/b/index.html';

let name = path.basename(filename);

console.log(name); //输出index.html

let name1 = path.basename(filename, '.html');

console.log(name1); //输出index 会移除掉.html
